

<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
  <title>OCC.Addons module &mdash; pythonocc API 0.18 documentation</title>
  

  
  
  
  

  

  
  
    

  

  
  
    <link rel="stylesheet" href="static/css/theme.css" type="text/css" />
  

  

  
        <link rel="index" title="Index"
              href="genindex.html"/>
        <link rel="search" title="Search" href="search.html"/>
    <link rel="top" title="pythonocc API 0.18 documentation" href="index.html"/> 

  
  <script src="static/js/modernizr.min.js"></script>

</head>

<body class="wy-body-for-nav" role="document">

   
  <div class="wy-grid-for-nav">

    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search">
          

          
            <a href="index.html" class="icon icon-home"> pythonocc API
          

          
          </a>

          
            
            
              <div class="version">
                0.18
              </div>
            
          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
              
            
            
              <!-- Local TOC -->
              <div class="local-toc"><ul>
<li><a class="reference internal" href="#">OCC.Addons module</a></li>
</ul>
</div>
            
          
        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="index.html">pythonocc API</a>
        
      </nav>


      
      <div class="wy-nav-content">
        <div class="rst-content">
          















<div role="navigation" aria-label="breadcrumbs navigation">

  <ul class="wy-breadcrumbs">
    
      <li><a href="index.html">Docs</a> &raquo;</li>
        
      <li>OCC.Addons module</li>
    
    
      <li class="wy-breadcrumbs-aside">
        
            
            <a href="sources/OCC.Addons.rst.txt" rel="nofollow"> View page source</a>
          
        
      </li>
    
  </ul>

  
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
  <div class="section" id="occ-addons-module">
<h1>OCC.Addons module<a class="headerlink" href="#occ-addons-module" title="Permalink to this headline">¶</a></h1>
<span class="target" id="module-OCC.Addons"></span><dl class="class">
<dt id="OCC.Addons.LineItem">
<em class="property">class </em><code class="descname">LineItem</code><span class="sig-paren">(</span><em>*args</em><span class="sig-paren">)</span><a class="headerlink" href="#OCC.Addons.LineItem" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/2/library/functions.html#object" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">object</span></code></a></p>
<ul class="simple">
<li>Creates a shape of the given text</li>
</ul>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>X1</strong> (<a class="reference external" href="https://docs.python.org/2/library/functions.html#float" title="(in Python v2.7)"><em>float</em></a>) – X-Position of the first point</li>
<li><strong>Y1</strong> (<em>float        
:param X2: X-Position of the second point    
:type X2: float 
:param Y2: Y-Position of the second point   
:type Y2: float</em>) – Y-Position of the first point</li>
<li><strong>theLayer</strong> (<em>const Handle_Visual3d_Layer&amp;</em>) – The Layer</li>
<li><strong>theType</strong> (<a class="reference external" href="https://docs.python.org/2/library/functions.html#int" title="(in Python v2.7)"><em>int</em></a>) – Type of line: 0..10</li>
<li><strong>theWidth</strong> (<a class="reference external" href="https://docs.python.org/2/library/functions.html#float" title="(in Python v2.7)"><em>float</em></a>) – Width of the line</li>
<li><strong>theTransp</strong> (<a class="reference external" href="https://docs.python.org/2/library/functions.html#float" title="(in Python v2.7)"><em>float</em></a>) – Transparency: 0..1</li>
<li><strong>theColor</strong> (<em>const Quantity_Color &amp;</em>) – Rgb color</li>
</ul>
</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="OCC.Addons.LineItem.RedrawLayerPrs">
<code class="descname">RedrawLayerPrs</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#OCC.Addons.LineItem.RedrawLayerPrs" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="OCC.Addons.LineItem.thisown">
<code class="descname">thisown</code><a class="headerlink" href="#OCC.Addons.LineItem.thisown" title="Permalink to this definition">¶</a></dt>
<dd><p>The membership flag</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="OCC.Addons.TextItem">
<em class="property">class </em><code class="descname">TextItem</code><span class="sig-paren">(</span><em>*args</em><span class="sig-paren">)</span><a class="headerlink" href="#OCC.Addons.TextItem" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/2/library/functions.html#object" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">object</span></code></a></p>
<ul class="simple">
<li>Displays a text in the screen</li>
</ul>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>theText</strong> (<em>const TCollection_AsciiString&amp;</em>) – Text to display</li>
<li><strong>theX1</strong> (<a class="reference external" href="https://docs.python.org/2/library/functions.html#float" title="(in Python v2.7)"><em>float</em></a>) – X-Position on the display</li>
<li><strong>theY1</strong> (<a class="reference external" href="https://docs.python.org/2/library/functions.html#float" title="(in Python v2.7)"><em>float</em></a>) – Y-Position on the display</li>
<li><strong>theHeight</strong> (<a class="reference external" href="https://docs.python.org/2/library/functions.html#float" title="(in Python v2.7)"><em>float</em></a>) – Size of the font</li>
<li><strong>theFontName</strong> (<em>const TCollection_AsciiString&amp;</em>) – Name of the font</li>
<li><strong>theColor</strong> (<em>const Quantity_Color&amp;</em>) – Rgb color. E.g. Quantity_Color(0..1, 0..1, 0..1, 1)</li>
<li><strong>theSubtitleColor</strong> (<em>const Quantity_Color&amp;</em>) – Rgb color of the sub title</li>
<li><strong>theTypeOfDisplay</strong> (<a class="reference external" href="https://docs.python.org/2/library/functions.html#int" title="(in Python v2.7)"><em>int</em></a>) – Type of display, e.g. Aspect_TODT_NORMAL, Aspect_TODT_SUBTITLE, Aspect_TODT_DEKALE</li>
<li><strong>theLayer</strong> – </li>
<li><strong>ScrollX</strong> – </li>
<li><strong>Scrolly</strong> – </li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Type:</th><td class="field-body"><p class="first">const Handle_Visual3d_Layer&amp;</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body"><p class="first">const float</p>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Type:</th><td class="field-body"><p class="first last">const float</p>
</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="OCC.Addons.TextItem.RedrawLayerPrs">
<code class="descname">RedrawLayerPrs</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#OCC.Addons.TextItem.RedrawLayerPrs" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="OCC.Addons.TextItem.thisown">
<code class="descname">thisown</code><a class="headerlink" href="#OCC.Addons.TextItem.thisown" title="Permalink to this definition">¶</a></dt>
<dd><p>The membership flag</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="OCC.Addons.TextureItem">
<em class="property">class </em><code class="descname">TextureItem</code><span class="sig-paren">(</span><em>*args</em><span class="sig-paren">)</span><a class="headerlink" href="#OCC.Addons.TextureItem" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/2/library/functions.html#object" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">object</span></code></a></p>
<ul class="simple">
<li>Creates a shape of the given text</li>
</ul>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>theImageFilename</strong> (<em>const TCollection_AsciiString&amp;</em>) – Path to the image</li>
<li><strong>theView</strong> (<em>V3d_View *        
:param theLayer: Layer for the texture
:type theLayer: const Handle_Visual3d_Layer&amp;</em>) – The display view</li>
</ul>
</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="OCC.Addons.TextureItem.RedrawLayerPrs">
<code class="descname">RedrawLayerPrs</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#OCC.Addons.TextureItem.RedrawLayerPrs" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="OCC.Addons.TextureItem.SetAbsolutePosition">
<code class="descname">SetAbsolutePosition</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#OCC.Addons.TextureItem.SetAbsolutePosition" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="OCC.Addons.TextureItem.SetRelativePosition">
<code class="descname">SetRelativePosition</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#OCC.Addons.TextureItem.SetRelativePosition" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="OCC.Addons.TextureItem.thisown">
<code class="descname">thisown</code><a class="headerlink" href="#OCC.Addons.TextureItem.thisown" title="Permalink to this definition">¶</a></dt>
<dd><p>The membership flag</p>
</dd></dl>

</dd></dl>

<dl class="function">
<dt id="OCC.Addons.display_available_fonts">
<code class="descname">display_available_fonts</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#OCC.Addons.display_available_fonts" title="Permalink to this definition">¶</a></dt>
<dd><ul class="simple">
<li>Prints a list of all available fonts.</li>
</ul>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">void</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="OCC.Addons.new_instancemethod">
<code class="descname">new_instancemethod</code><span class="sig-paren">(</span><em>func</em>, <em>inst</em>, <em>cls</em><span class="sig-paren">)</span><a class="headerlink" href="#OCC.Addons.new_instancemethod" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="OCC.Addons.register_font">
<code class="descname">register_font</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#OCC.Addons.register_font" title="Permalink to this definition">¶</a></dt>
<dd><ul class="simple">
<li>Add a font to the available font list.</li>
</ul>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>aFontPath</strong> (<em>char *</em>) – Path to the font.</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">void</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="OCC.Addons.text_to_brep">
<code class="descname">text_to_brep</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#OCC.Addons.text_to_brep" title="Permalink to this definition">¶</a></dt>
<dd><ul class="simple">
<li>Creates a shape of the given text.</li>
</ul>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>text_to_render</strong> (<em>char *</em>) – Text to render</li>
<li><strong>aFontName</strong> (<em>char *</em>) – Font name</li>
<li><strong>aFontAspect</strong> (<em>Font_FontAspect</em>) – Fontaspect, Font_FA_Regular, Font_FA_Bold, Font_FA_Italic or Font_FA_BoldItalic</li>
<li><strong>aSize</strong> (<a class="reference external" href="https://docs.python.org/2/library/functions.html#float" title="(in Python v2.7)"><em>float</em></a>) – Size of the font</li>
<li><strong>isCompositeCurve</strong> (<a class="reference external" href="https://docs.python.org/2/library/functions.html#bool" title="(in Python v2.7)"><em>bool</em></a>) – </li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="OCC.TopoDS.html#OCC.TopoDS.TopoDS_Shape" title="OCC.TopoDS.TopoDS_Shape">TopoDS_Shape</a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

</div>


           </div>
           <div class="articleComments">
            
           </div>
          </div>
          <footer>
  

  <hr/>

  <div role="contentinfo">
    <p>
        &copy; Copyright 2017, Thomas Paviot.

    </p>
  </div>
  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. 

</footer>

        </div>
      </div>

    </section>

  </div>
  


  

    <script type="text/javascript">
        var DOCUMENTATION_OPTIONS = {
            URL_ROOT:'./',
            VERSION:'0.18',
            COLLAPSE_INDEX:false,
            FILE_SUFFIX:'.html',
            HAS_SOURCE:  true,
            SOURCELINK_SUFFIX: '.txt'
        };
    </script>
      <script type="text/javascript" src="static/jquery.js"></script>
      <script type="text/javascript" src="static/underscore.js"></script>
      <script type="text/javascript" src="static/doctools.js"></script>

  

  
  
    <script type="text/javascript" src="static/js/theme.js"></script>
  

  
  
  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.StickyNav.enable();
      });
  </script>
   

</body>
</html>